tools/libs/call: Describe return values and error semantics for xencall*
authorIan Campbell <ian.campbell@citrix.com>
Fri, 27 Nov 2015 12:08:32 +0000 (12:08 +0000)
committerIan Campbell <ian.campbell@citrix.com>
Fri, 22 Jan 2016 12:24:20 +0000 (12:24 +0000)
commit139ff8ffc94d173531610e093c9a40c4688fa593
tree6e46a88ecca2114088eb8c8bddd24618bf2a7eea
parent9eb88fad0df7de017a52a634649c294f7a2561f7
tools/libs/call: Describe return values and error semantics for xencall*

This behaviour has been confirmed by inspection on:

 - Linux
 - NetBSD & FreeBSD (NB: hcall->retval is the hypercall return value
   only for values >= 0. For negative values the underlying privcmd
   driver translates the value from Xen to {Net,Free}BSD errno space
   and returns it as the result of the ioctl, which becomes
   ret=-1/errno=EFOO in userspace)
 - MiniOS (which takes care of errno in this library)

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Acked-by: Roger Pau Monné <roger.pau@citrix.com>
Cc: Roger Pau Monné <roger.pau@citrix.com>
tools/libs/call/include/xencall.h